import request from '@/utils/request'

// 查询商品管理列表
export function listGoods_m(query) {
  return request({
    url: '/client/goods/list',
    method: 'get',
    params: query
  })
}

// 查询商品管理详细
export function getGoods_m(goodsId) {
  return request({
    url: '/client/goods/' + goodsId,
    method: 'get'
  })
}

// 新增商品管理
export function addGoods_m(data) {
  return request({
    url: '/client/goods',
    method: 'post',
    data: data
  })
}

// 修改商品管理
export function updateGoods_m(data) {
  return request({
    url: '/client/goods',
    method: 'put',
    data: data
  })
}

// 删除商品管理
export function delGoods_m(goodsId) {
  return request({
    url: '/client/goods/' + goodsId,
    method: 'delete'
  })
}

//添加购物车
export function addCar(query) {
  return request({
    url: '/client/goods/addcar',
    method: 'post',
    params: query
  })
}
